{{extend '../_layouts/home.html'}}
{{block 'title'}}{{'提交历史'}}{{/block}}

{{block 'head'}}
  <style>
    .table th {
      text-align: center;
    }
  </style>
{{/block}}

{{block 'body'}}
<section class="container text-center">
  <div class="panel panel-default">
    <!-- Default panel contents -->
    <div class="panel-heading">
      <h1>提交历史</h1>
    </div>

    <table class="table table-striped text-center table-bordered ">
      <thead>
        <tr>
          <th>姓名</th>
          <th>学号</th>
          <th>家庭住址</th>
          <th>所在单位</th>
          <th>健康状况</th>
          <th>提交时间</th>
        </tr>
      </thead>
      <tbody>
        <% for(var i = data.length - 1; i >= 0; i--){ %>
        <tr>
          <td>{{ data[i].name }}</td>
          <td>{{ data[i].user_num }}</td>
          <td>{{ data[i].province }}-{{ data[i].city }}-{{ data[i].area }}</td>
          <td>{{ data[i].unit }}</td>
          <td>
            <% for(var j =0; j < data[i].health_condition.length; j++){ %>
              {{ health_option[data[i].health_condition[j]] }}
            <% } %>
          </td>
          <td>{{ data[i].submit_time_format }}</td>
        </tr>
        <% } %>
      </tbody>
    </table>
    <hr/>
    <!-- <nav aria-label="Page navigation">
      <ul class="pagination">

        <% for(var i = 1; i <= pageSum; i++){ %>
          <% if (i === page) { %>
            <li class="active">
              <a href="/topics/?page=<%= i %>"><%= i %></a>
            </li>
          <% } else if (i != page) { %>
          <li><a href="/topics/?page=<%= i %>"><%= i %> </a></li>
          <% } %>
        <% } %>
    </nav> -->
  </div>
</section>

<script src="/node_modules/jquery/dist/jquery.js"></script>
<script src="/node_modules/bootstrap/dist/js/bootstrap.js"></script>
{{/block}}

